using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing.Printing;
using System.ComponentModel;

namespace Skywave.Windows.Forms
{
    public class AdvancedPageSetupDialog : System.Windows.Forms.CommonDialog
    {
        private IntPtr hwndOwner;
        private AdvancedPageSetupDialogForm mForm = new AdvancedPageSetupDialogForm();

        public PrintDocument Document
        {
            get { return mForm.Document; }
            set { mForm.Document = value; }
        }

        [Browsable(false)]
        public Skywave.ComponentModel.ProfilesHolder ProfilesHolder
        {
            get { return mForm.ProfilesHolder; }
            set { mForm.ProfilesHolder = value; }
        }

        //[DefaultValue("")]
        //public string ProfilesPath
        //{
        //    get { return mForm.ProfilesPath; }
        //    set { mForm.ProfilesPath = value; }
        //}

        public override void Reset()
        {
            Document = null;
        }

        protected override bool RunDialog(IntPtr hwndOwner)
        {
            this.hwndOwner = hwndOwner;
            if (mForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                return true;
            else
                return false;
        }
    }
}
